#ifndef _EEPROM_H_
#define _EEPROM_H_

#include <stdint.h>

/* Exported macro ------------------------------------------------------------*/

/* Page status definitions */
#define EEPROM_ERASED			((uint16_t)0xFFFF)	/* PAGE is empty */
#define EEPROM_RECEIVE_DATA		((uint16_t)0xEEEE)	/* PAGE is marked to receive data, temperary state in transfering */
#define EEPROM_VALID_PAGE		((uint16_t)0xCCCC)	/* PAGE containing valid data */
#define EEPROM_IGNORED_PAGE		((uint16_t)0x0000)

#define EEPROM_OK		(uint16_t)80 // to avoid collision with HAL lib
#define EEPROM_NOT_INIT		(uint16_t)81
#define EEPROM_BAD_ADDRESS	(uint16_t)82
#define EEPROM_OUT_SIZE		(uint16_t)83

#define EEPROM_DEFAULT_DATA		0xFFFF

uint16_t eeprom_init(void); //*
uint16_t eeprom_read (uint16_t address, uint16_t *data); //*
uint16_t eeprom_write(uint16_t address, uint16_t data); //*

#endif	/* __EEPROM_H */
